<?php
class Admini_RecommendController extends Uuch_ManageController{
    
    public function init() {
        parent::init();
        $this->appendCss('/admins/css/yundan.css');
        $this->appendCss('/admins/css/common.css');
        $this->appendScript('/admins/js/jquery/jquery-1.7.2.min.js')->appendScript('/js/jquery.validate.min.js')->appendScript('/js/messages_cn.js')->appendScript('/js/uuch.js');
        $this->setTitle("后台推荐用户管理");
        $this->view->type="system";
    }  
    
    public function indexAction() 
    {
        $quick = $this->getSafeParam("quick");
        $pagesize=15;        
        $pageindex = $this->getSafeParam('start');
        if(!$pageindex) { $pageindex=0; }
        $startTime = $this->getSafeParam('starttime');
        $entTime = $this->getSafeParam('endtime');
        $recommendItem = Application_Model_Recommend::getFiltel($quick, $startTime, $entTime, null, $pagesize, $pageindex);
        $this->view->RecommendList = $recommendItem["list"];
        $this->view->RecommendAll = $recommendItem;
        $this->view->quick = $quick;
        $this->view->starttime = $startTime;
        $this->view->endtime = $entTime;
        $this->view->stype = 24;
    }
    
    public function rewardAction()
    {
        $quick = $this->getSafeParam("quick");
        $pagesize=20;        
        $pageindex = $this->getSafeParam('start');
        if(!$pageindex) { $pageindex=0; }
        $startTime = $this->getSafeParam('starttime');
        $entTime = $this->getSafeParam('endtime');
        $isAbled = $this->getSafeParam("isAbled");
        $isComp = $this->getSafeParam("isComp");
        $rewardItem = Application_Model_Reward::getByFilter($quick, $startTime, $entTime, $isAbled, $isComp, $pagesize, $pageindex);
        $this->view->rewardList = $rewardItem["list"];
        $this->view->rewardAll = $rewardItem;
        $this->view->IsAbledAll = Application_Model_Reward::ByIsAbledAll();
        $this->view->quick = $quick;
        $this->view->starttime = $startTime;
        $this->view->endtime = $entTime;
        $this->view->isAbled = $isAbled;
        $this->view->isComp = $isComp;
        $this->view->stype = 25;
    }
    
}